package com.itheima.app;

import com.itheima.service.StrudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class StrudentApp {
    public static void main(String[] args) {
        //1.解析配置文件 获得容器对象
        ApplicationContext strudentContext = new ClassPathXmlApplicationContext("application-config.xml");
        //2.从容器中获得bean对象
        StrudentService stuService = (StrudentService)strudentContext.getBean("strudentService");
        //3.使用
        stuService.save();
    }
}
